UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4bvHf5TlDbAJERGXLfvjSA8N/tisD4qi2/6i1bC7BYw='
WHERE
key_id = '373ed79a29df963005458a7172dbcafd194fcb2bd7b657a5ae2e2e367b58aa1d'
AND (
token = '4bvHf5TlDbAJERGXLfvjSA8N/tisD4qi2/6i1bC7BYw='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)