UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'YslhaxiuDAEKUhS3zf9aN+Zjb9MXNjNIJ5IP65YF2XE='
WHERE
key_id = '3d5a2904ebca845618dd7b137d8bdd89bbea9172a6096fe5047a54544cb07e95'
AND (
token = 'YslhaxiuDAEKUhS3zf9aN+Zjb9MXNjNIJ5IP65YF2XE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)