UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Wd3378tNQ4N0AoxjfAe0Iy4ghvrFCTRA2bqQsEZ5N/A='
WHERE
key_id = 'fc6d0a3d3ccc38aa7e9937ef9871f1090ff8aaafef64b40317c6c7d2564bfeca'
AND (
token = 'Wd3378tNQ4N0AoxjfAe0Iy4ghvrFCTRA2bqQsEZ5N/A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)