UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'SFaUMVcu5lSmLxl2OmdmcHie4+aGsWNg6/c2Yzemp5Q='
WHERE
key_id = '2a367e0a7db80b5cc15b0822d21d76cfdc912a377776fe803f3d6b9ede10c6f2'
AND (
token = 'SFaUMVcu5lSmLxl2OmdmcHie4+aGsWNg6/c2Yzemp5Q='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)