UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '+NUrIZMx9FE3WR6sNckJgdJ5TZr9lcyu4Ph9bYsbCyU='
WHERE
key_id = 'ca9a3266d89676cf76f0eb39f33d5311e2fcbe39f6e4ae568996bcdb2ad1bf47'
AND (
token = '+NUrIZMx9FE3WR6sNckJgdJ5TZr9lcyu4Ph9bYsbCyU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)