UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IGHrAItHBYMbPtM3pDIi9/LLrH30hcKnqAQ2mNhEO/U='
WHERE
key_id = '7bc902abaf813235bcfcabce6bcc35d7a081ce8b0b41731181c5585976a3aa32'
AND (
token = 'IGHrAItHBYMbPtM3pDIi9/LLrH30hcKnqAQ2mNhEO/U='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)