UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'bjjotyXB4IWpcMiAZ+ma5TNnwVT3ZahceWuDCHGp16g='
WHERE
key_id = '3f015d83c48be09c0c77abc3e7106853d9bc9bf886f8a0091bd6d6c0a29c7475'
AND (
token = 'bjjotyXB4IWpcMiAZ+ma5TNnwVT3ZahceWuDCHGp16g='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)