UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'fe/ufWUO8xgA2+UiS6MTbStlAJmXcfG1AIF6KY0s3Ew='
WHERE
key_id = '9111b35375e95ba49bf59e32c5093c8c3d6c11a3d1d9cde6465b5d7c69720a2c'
AND (
token = 'fe/ufWUO8xgA2+UiS6MTbStlAJmXcfG1AIF6KY0s3Ew='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)