UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'rAr9Fz0U4zJOyhi6A4ss2yiwoIEkLcL4WjGg7NorGfw='
WHERE
key_id = '044925e8b872c67053394e5bb287be3a7d110bc18762d4acaf7a8fe2c4d1267f'
AND (
token = 'rAr9Fz0U4zJOyhi6A4ss2yiwoIEkLcL4WjGg7NorGfw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)