UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'BMJbZM+tkt/x449WKmA5Yu+THlVgOtr1ht61NU92by4='
WHERE
key_id = 'c5d2b3058ac2fc4977647e8a7e9bcfe1ded4292ca4a04408a061b3eecdeacc42'
AND (
token = 'BMJbZM+tkt/x449WKmA5Yu+THlVgOtr1ht61NU92by4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)