UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'cjpopBSjogotHxdhIqkhAvmwhvjI/TDZ8QuflCwQ3G4='
WHERE
key_id = '84fb9bf86d2d553419cdefef4a78e3cb9525c131df75cf2b1fb94ed71e387f80'
AND (
token = 'cjpopBSjogotHxdhIqkhAvmwhvjI/TDZ8QuflCwQ3G4='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)