UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'mMeo+SpB9U08HTIVo/HwlzdToopjLTek0wxE2au1E+c='
WHERE
key_id = 'fbe369b76003559960c06cbcd8685f210bc546d3555b5d8239c2e078585fc8ce'
AND (
token = 'mMeo+SpB9U08HTIVo/HwlzdToopjLTek0wxE2au1E+c='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)