UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '0ycL1xftKkR/6cisnzCVJO4+yGLG3ulKHK2pg0GgrqI='
WHERE
key_id = '934aed55327480653483e680b4a562cfb90b37036b45623e61303685a2793c14'
AND (
token = '0ycL1xftKkR/6cisnzCVJO4+yGLG3ulKHK2pg0GgrqI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)