UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4zGy4tbazfZfldXiJueK3Zd6CcK09wQDibBYE8f8qcE='
WHERE
key_id = '735bff4aa2d6f70788dae5153b0445c91d82c418ceb51fcab92ee09ac8159d11'
AND (
token = '4zGy4tbazfZfldXiJueK3Zd6CcK09wQDibBYE8f8qcE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)