UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'o5WWPjDYqSp/+OXPa1I0h/ed/VE2t+nrEN90V6D0u3c='
WHERE
key_id = '633f7e2bcda5d9ed534fdf87daa0cb2972b79a579a65c49eadfad6a5d0905f27'
AND (
token = 'o5WWPjDYqSp/+OXPa1I0h/ed/VE2t+nrEN90V6D0u3c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)