UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '2ORjuCTYtsJRTJrJUhVBSXb0/IgoGvcGtBRMVwGYz1E='
WHERE
key_id = '643ee73774034eae7fec2ff39ae65ab75d1db4ded4e0ca6ef061e27af1c74f82'
AND (
token = '2ORjuCTYtsJRTJrJUhVBSXb0/IgoGvcGtBRMVwGYz1E='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)