UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'V9ViTaCDGrE5PjNtsdODMaQWSLhCVnOUVo2KV/eWmZM='
WHERE
key_id = '2803f0496143955fe6d959b193d8c425e6eca8a9ad39fa71dab17f44c5f44290'
AND (
token = 'V9ViTaCDGrE5PjNtsdODMaQWSLhCVnOUVo2KV/eWmZM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)