UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GwVQ3hDavLTBPP92gHfH+Njv1+B+W6+Drm+S+Sw3OfM='
WHERE
key_id = '9272b03206d4674cdde011b117951abaf5c469720a8efdc96f897d8dc2aaabc9'
AND (
token = 'GwVQ3hDavLTBPP92gHfH+Njv1+B+W6+Drm+S+Sw3OfM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)