UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Miq5PdCPJIq1o1JnJ3eVWZR/nXpe/7xV7Q06gyO3p1M='
WHERE
key_id = '8cfcb827ac14d282eec28b23ed95cb1cdd8e3831bd0614a43b76e9866f385148'
AND (
token = 'Miq5PdCPJIq1o1JnJ3eVWZR/nXpe/7xV7Q06gyO3p1M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)