UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ArCGfMpF+vpXTW/KMoga6rFTllGcWWV4o/Ozksk1jZU='
WHERE
key_id = '7ec3b19fcb77b38bad02a551e342af42edac9aeac666c26923fdaef8a24574a4'
AND (
token = 'ArCGfMpF+vpXTW/KMoga6rFTllGcWWV4o/Ozksk1jZU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)