UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kSv+N6Unqwb2v9HAg6oi/uH3d2eUL20mZqDYb5xp1NI='
WHERE
key_id = '56e1d0bdf76468cc11dfd94deeda6aa821dd56e1aa11a7ac3c3a8cd411fc4d5a'
AND (
token = 'kSv+N6Unqwb2v9HAg6oi/uH3d2eUL20mZqDYb5xp1NI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)