UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Si3aX2G1tForaXfvkXCVQBKWVC9gkXWJdc5tdUsPhrQ='
WHERE
key_id = '29ecfa54e8d294c2ad899ed513cf7ef2a9dd19fc6d60734a5ad96a028a35298b'
AND (
token = 'Si3aX2G1tForaXfvkXCVQBKWVC9gkXWJdc5tdUsPhrQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)