UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'RkdLrOIBHyK1BjE/m4KMh5K3EwpSqaKI7uFhYzRWKQA='
WHERE
key_id = '0a96be5ed81f35e263e580fab4973696b6d826aca5ccf32f767434d47049cd24'
AND (
token = 'RkdLrOIBHyK1BjE/m4KMh5K3EwpSqaKI7uFhYzRWKQA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)