UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'W/bsNkLH/TLXdFDzLeZCTJS/O3RKy5vWVAT+CQDBUUY='
WHERE
key_id = '8eb30ccea1c3739a0653c18789d667071e45d3f01924e8da3bfa4abb743684d2'
AND (
token = 'W/bsNkLH/TLXdFDzLeZCTJS/O3RKy5vWVAT+CQDBUUY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)