UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'B0/ESS8S0bIdhr/eCdC6pUn/UMeM5z4g83wzTX6YLYo=' 
WHERE 
  key_id = '430559f82ee3c97f8cccc53684830cba5adf265edfa6ec438d9ac00ebbf9f3da' 
  AND (
    token = 'B0/ESS8S0bIdhr/eCdC6pUn/UMeM5z4g83wzTX6YLYo=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00020