UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'zcbHEOURN4gC0fDKakoxWWzUBhZ93kQYulnbQqJam6s='
WHERE
key_id = 'e2af8d3238b4ad167fe207fc32604de3c4afd9f975219b47785b8dd1b9666fc2'
AND (
token = 'zcbHEOURN4gC0fDKakoxWWzUBhZ93kQYulnbQqJam6s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)