UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '9DK084Tvi5RemN1mRYj6p+0CI7fS1fM4Ca4UqqKSIOI='
WHERE
key_id = '29cb4dcd704d2ac3f6fd344ceb65fad6dc4cfc2a230340a505673fd337763714'
AND (
token = '9DK084Tvi5RemN1mRYj6p+0CI7fS1fM4Ca4UqqKSIOI='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)