UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'iWrS43iy9XWOTzyl6+BwSgqpgObxFqpIyY1pgtB+JR4='
WHERE
key_id = '2c93eaf6bf877a9d41a48afe6badedb48532c60dbe4a7cc881149aad604bbfc7'
AND (
token = 'iWrS43iy9XWOTzyl6+BwSgqpgObxFqpIyY1pgtB+JR4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)