UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xUUbJlLSQVsB51qib4m27Tj+Hdh50Ioy8IaeBAxwI9M='
WHERE
key_id = 'baa7d511d401db64e05c4ff443a0a2e25d2071392a3caae89731bd55a9f48a0e'
AND (
token = 'xUUbJlLSQVsB51qib4m27Tj+Hdh50Ioy8IaeBAxwI9M='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)