UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Cv9/2yZJn7a9ASiOTSa726YaR7QmcJ0x1g0Yofb0ANA='
WHERE
key_id = '7bc444bce55ad9b7aeeee86af1445d9b1978956943b1642b036184c39352785c'
AND (
token = 'Cv9/2yZJn7a9ASiOTSa726YaR7QmcJ0x1g0Yofb0ANA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)