UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Ta3iSBD+O9doCJXekfYkEwsFR6JQxvMEgDWwQ0cM/2s='
WHERE
key_id = '3a2a8d217c0d672fb244cb613c4ae09b51315ab8877e9d39371ff616d5b47e63'
AND (
token = 'Ta3iSBD+O9doCJXekfYkEwsFR6JQxvMEgDWwQ0cM/2s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)