UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'p4m/cx0eq4bgHdSpfwcz0iWpQYvegLCHq0HL/LJ9uwQ='
WHERE
key_id = '7e9a57ef4464fd6276a6c3b0a932b49e2cc34fd5b25dff6a83fcb64cd48bf7c7'
AND (
token = 'p4m/cx0eq4bgHdSpfwcz0iWpQYvegLCHq0HL/LJ9uwQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)