UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'M6eMltXUMhZ1FxOmXtke207UHDR0i+sm9WGffbZbEh4='
WHERE
key_id = '6bf70c2d346a55f42d43c668edc625da3547bbb007da0d901abb823aeeaf37ee'
AND (
token = 'M6eMltXUMhZ1FxOmXtke207UHDR0i+sm9WGffbZbEh4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)