UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xB2GHgtOYPPAR+X+tU2P+JcoflrICUy+O/rQ4aRt3Oo='
WHERE
key_id = '408ed51cdde17f4d6d7ea05e10d5be6f481dfec4bcf218dd5f4fb06b8a5c33a2'
AND (
token = 'xB2GHgtOYPPAR+X+tU2P+JcoflrICUy+O/rQ4aRt3Oo='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)