UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mqb4vuYtUWkUs4A7SBFWO+SMvhwD6rZoTi9Qzp++TyM='
WHERE
key_id = '602a59ffa3a15e503455221fd6b46ac510af73686d0bbd9e324c1e89edd4a683'
AND (
token = 'mqb4vuYtUWkUs4A7SBFWO+SMvhwD6rZoTi9Qzp++TyM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)